package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShopActivityMapper;
import com.ruoyi.system.domain.ShopActivity;
import com.ruoyi.system.service.IShopActivityService;

/**
 * 优惠活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-20
 */
@Service
public class ShopActivityServiceImpl implements IShopActivityService 
{
    @Autowired
    private ShopActivityMapper shopActivityMapper;

    /**
     * 查询优惠活动
     * 
     * @param activityId 优惠活动主键
     * @return 优惠活动
     */
    @Override
    public ShopActivity selectShopActivityByActivityId(Long activityId)
    {
        return shopActivityMapper.selectShopActivityByActivityId(activityId);
    }

    /**
     * 查询优惠活动列表
     * 
     * @param shopActivity 优惠活动
     * @return 优惠活动
     */
    @Override
    public List<ShopActivity> selectShopActivityList(ShopActivity shopActivity)
    {
        return shopActivityMapper.selectShopActivityList(shopActivity);
    }

    /**
     * 新增优惠活动
     * 
     * @param shopActivity 优惠活动
     * @return 结果
     */
    @Override
    public int insertShopActivity(ShopActivity shopActivity)
    {
        return shopActivityMapper.insertShopActivity(shopActivity);
    }

    /**
     * 修改优惠活动
     * 
     * @param shopActivity 优惠活动
     * @return 结果
     */
    @Override
    public int updateShopActivity(ShopActivity shopActivity)
    {
        return shopActivityMapper.updateShopActivity(shopActivity);
    }

    /**
     * 批量删除优惠活动
     * 
     * @param activityIds 需要删除的优惠活动主键
     * @return 结果
     */
    @Override
    public int deleteShopActivityByActivityIds(Long[] activityIds)
    {
        return shopActivityMapper.deleteShopActivityByActivityIds(activityIds);
    }

    /**
     * 删除优惠活动信息
     * 
     * @param activityId 优惠活动主键
     * @return 结果
     */
    @Override
    public int deleteShopActivityByActivityId(Long activityId)
    {
        return shopActivityMapper.deleteShopActivityByActivityId(activityId);
    }
}
